package asava.trees;

import asava.names.Name;

import java.util.List;

/**
 * @author Tim Richter
 */
public final class Class extends Tree {
    public int modifiers;
    public Name name;
    public Tree base;
    public List<Tree> interfaces;
    public List<Tree> fields;
    public List<Tree> methods;

    public Class(final int modifiers,
                 final Name name,
                 final Tree base,
                 final List<Tree> interfaces,
                 final List<Tree> fields,
                 final List<Tree> methods) {
        this.modifiers = modifiers;
        this.name = name;
        this.base = base;
        this.interfaces = interfaces;
        this.fields = fields;
        this.methods = methods;
    }

    @Override
    public int kind() {
        return TreeKind.CLASS;
    }

    @Override
    public void accept(final TreeVisitor visitor) {
        visitor.visit(this);
    }
}
